home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Utilities
/
Winter Shell 1.0d2
/
Source
/
Libraries
/
ByteLib
/
ByteLib.c
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-06-21
|
369 b
|
19 lines
|
[
TEXT/KAHL
]
/* Byte manipulation functions.
92/02/20 Ari Halberstadt (AIH)
- Created to avoid using ugly bit operations throughout my code.
*/
#include <limits.h>
#include "ByteLib.h"
unsigned char LoByte(unsigned short x)
{
return(x & (unsigned char) 0x00ff);
}
unsigned char HiByte(unsigned short x)
{
return((x >> (unsigned short) CHAR_BIT) & (unsigned char) 0x00ff);
}